//***********************************************************************
//  n.java    Author: 20172330
//
//***********************************************************************

import java.util.Scanner;

public class n
{
    public static void main(String []args)
    {
       int m = 1, n;
      

       Scanner scan = new Scanner(System.in);
       System.out.print("Enter an number: ");
       n = scan.nextInt();
       
       int a = 1;
       for(int count=1; count<= n; count++)
       {
         a *= count;
       }
         System.out.println("n! = :" + a);
       
       while (n >= 1)
       {
         m = m*n;
         n--;
       }

       System.out.println("n! = :" + m);
       
     }
}
